<%@ page language="java" contentType="text/html; charset=utf-8"
	isELIgnored="false" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>login</title>
<link rel="stylesheet" href="style/login.css" />
<script>
	function uaredirect(murl){
		try {
			if(document.getElementById("bdmark") != null){
			return;
			}
			var urlhash = window.location.hash;
			if (!urlhash.match("fromapp")){
				if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))) {
					location.replace(murl);
				}
			}
			
		} catch(err){
		
		}
	}
</script>
<script type="text/javascript">window.onload = uaredirect("phone-login.jsp")</script>
</head>
<body>
	<div class="box">
		<div class="main">
			<div class="main_right">
				<div class="main_right_body">
					<h4>
						用户登录<span>${result.msg}</span>
					</h4>
					<form onsubmit="return chack()" action="Login" method="POST">
						<input type="hidden" name="phone" value="false" />
						<p>账号</p>
						<p>
							<input type="text" id="usename" name="username"
								placeholder="请输入您的账号" />
						</p>
						<p>密码</p>
						<p>
							<input type="password" id="password" name="password"
								placeholder="密码" />
						</p>
						<p>
							<input type="submit" value="登录" class="bt" /><a
								href="register.jsp">注册</a> <a herf="">忘记密码？</a>
						</p>
					</form>
				</div>
			</div>
		</div>
	</div>
	<script>
			function chack(){
				var usename=document.getElementById("username").value;
				if(!/^[a-zA-Z0-9_]+$/.test(username)){
					alert("账号不合法");
					return false;
				}
				var password=document.getElementById("password").value;
				if(!/^[a-zA-Z0-9]+$/.test(password)){
					alert("密码不合法");
					return false;
				}
				else
				 return true;
			}
		</script>
</body>
</html>
